﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="Hclt.Msft.Til.CricketScoreboard.Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
    <title>ScoreBoard</title>
    <!-- link to scripts -->
	<script type="text/javascript" src="Scripts/Default_html.js"></script>
	<script type="text/javascript" src="Scripts/Silverlight.js"></script>	
	<!-- Style -->
	<style type="text/css">
		#silverlightControlHost {
			height: 100%;
			width: 100%;
		}
		#errorLocation {
			font-size: small;
			color: red;
		}
		
	</style>
</head>
<body style="margin-bottom:0px; margin-left:0px; margin-right:0px; margin-top:0px; background-color:#006699;" onload="createSilverlight();" >
    <form id="form1" runat="server">
    <!-- ScriptManager for page -->
    <asp:ScriptManager ID="scoreUpdateScriptManager" runat="server" EnablePartialRendering="true" >
    </asp:ScriptManager>
    <!-- Update Panel -->
    <asp:UpdatePanel ID="scoreUpdatePanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    <!-- Timer control set to postback the page after every 6 seconds -->
    <asp:Timer ID="scoreUpdateTimer" runat="server" Interval="6000"></asp:Timer>
     <!-- Host Silverlight -->
     <div id="silverlightControlHost"></div>
      <!-- Host for Refresh screen -->
     <div id="refreshImageHost">
      <br />
     </div>   
    </ContentTemplate>
    </asp:UpdatePanel>
   	    <!-- Runtime errors from Silverlight will be displayed here.
	    This will contain debugging information and should be removed or hidden when debugging is completed -->
	    <div id='errorLocation'></div>
	    <!-- Update Panel Animation Extender -->
    <ajaxToolkit:UpdatePanelAnimationExtender ID="upae" BehaviorID="animation" runat="server" TargetControlID="scoreUpdatePanel">
            <Animations>
                <OnUpdating>
                    <Sequence>
                        <ScriptAction Script="createAnimation();" />  
                    </Sequence>
                </OnUpdating>
                <OnUpdated>
                    <Sequence>
                        <ScriptAction Script="createSilverlight();" />
                    </Sequence>
                </OnUpdated>
            </Animations>
        </ajaxToolkit:UpdatePanelAnimationExtender>
    </form>
</body>
</html>
